/*
 * @Author: malgee
 * @Date: 2025-04-22 15:44:18
 * @LastEditors: maling
 * @LastEditTime: 2025-04-23 09:12:54
 * @FilePath: /vue3-ts-cms/src/service/axios_demo.ts
 * @Description: axios demo
 *
 */
import axiosHttp from '.'
// import { type MGDataType } from './request/type'

// axios.get('http://123.207.32.32:8000/home/multidata').then((response) => {
//   console.log(response)
// }).catch((error) => {
//   console.log(error)
// })

axiosHttp
  .request({
    url: '/home/multidata',
    method: 'get',
    interceptors: {
      requestInterceptor: (config) => {
        console.log('单个请求拦截器-成功')
        return config
      },
      requestInterceptorCatch: (error) => {
        console.log('单个请求拦截器-失败')
        return error
      },
      responseInterceptor: (response) => {
        console.log('单个响应拦截器-成功')
        return response
      },
      responseInterceptorCatch: (error) => {
        console.log('单个响应拦截器-失败')
        return error
      }
    }
  })
  .then((response) => {
    console.log('>>>', response)
  })
  .catch((error) => {
    console.log(error)
  })
